from PIL import Image, ImageOps

def SetDot(week, day):
    image1 = Image.open("./photos/month.png")
    image2 = Image.open("./photos/heart.png")

    image2 = image2.resize((125, 125))

    im1w = image1.size[0]//2
    im2w = image2.size[0]//2
    im2h = image2.size[1]//2

    position_dw = [
        [
            ((im1w-375)-im2w,800-im2h),
            ((im1w-250)-im2w,800-im2h),
            ((im1w-125)-im2w,800-im2h),
            (im1w-im2w,800-im2h),
            ((im1w+125)-im2w,800-im2h),
            ((im1w+250)-im2w,800-im2h),
            ((im1w+375)-im2w,800-im2h)
        ],
        [
            ((im1w-375)-im2w,900-im2h),
            ((im1w-250)-im2w,900-im2h),
            ((im1w-125)-im2w,900-im2h),
            (im1w-im2w,900-im2h),
            ((im1w+125)-im2w,900-im2h),
            ((im1w+250)-im2w,900-im2h),
            ((im1w+375)-im2w,900-im2h)
        ],
        [
            ((im1w-375)-im2w,1000-im2h),
            ((im1w-250)-im2w,1000-im2h),
            ((im1w-125)-im2w,1000-im2h),
            (im1w-im2w,1000-im2h),
            ((im1w+125)-im2w,1000-im2h),
            ((im1w+250)-im2w,1000-im2h),
            ((im1w+375)-im2w,1000-im2h)
        ],
        [
            ((im1w-375)-im2w,1100-im2h),
            ((im1w-250)-im2w,1100-im2h),
            ((im1w-125)-im2w,1100-im2h),
            (im1w-im2w,1100-im2h),
            ((im1w+125)-im2w,1100-im2h),
            ((im1w+250)-im2w,1100-im2h),
            ((im1w+375)-im2w,1100-im2h)
        ],
        [
            ((im1w-375)-im2w,1200-im2h),
            ((im1w-250)-im2w,1200-im2h),
            ((im1w-125)-im2w,1200-im2h),
            (im1w-im2w,1200-im2h),
            ((im1w+125)-im2w,1200-im2h),
            ((im1w+250)-im2w,1200-im2h),
            ((im1w+375)-im2w,1200-im2h)
        ],
        [
            ((im1w-375)-im2w,1300-im2h),
            ((im1w-250)-im2w,1300-im2h),
            ((im1w-125)-im2w,1300-im2h),
            (im1w-im2w,1300-im2h),
            ((im1w+125)-im2w,1300-im2h),
            ((im1w+250)-im2w,1300-im2h),
            ((im1w+375)-im2w,1300-im2h)
        ]
    ]

    image1.paste(image2, position_dw[week][day], image2)
    # image1.show()
    image1.save('./photos/dots.png')
